<template>
    <div class="textBox">
        <el-card class="box-card">
            <p>你的订单号为以生成,请及时支付。</p>
            <div>
                <el-button
                    type="primary"
                    @click="openFullScreen"
                    v-loading.fullscreen.lock="fullscreenLoading"
                >
                    立即支付
                </el-button>
            </div>
        </el-card>
    </div>
</template>

<script>
import { createNamespacedHelpers } from "vuex";
const { mapActions: ordersgMapActions } = createNamespacedHelpers("orders"); //主仓库引入子仓库的名称,
export default {
    props: ["id"],
    data() {
        return {
            fullscreenLoading: false,
            arr: this.id.split(","),
        };
    },
    methods: {
        ...ordersgMapActions(["addOrders"]),
        openFullScreen() {
            this.fullscreenLoading = true;
            setTimeout(() => {
                this.fullscreenLoading = false;
            }, 2000);
            this.addOrders({
                parkingId: this.arr[0],
                tenants: this.arr[1],
            });
        },
    },
};
</script>

<style>
.textBox {
    display: flex;
    justify-content: center;
}
.text {
    font-size: 14px;
}

.item {
    padding: 18px 0;
}

.box-card {
    width: 480px;
}
</style>